package com.flink.cus.wdopers;

import org.apache.flink.api.java.tuple.Tuple3;
import org.apache.flink.streaming.api.windowing.triggers.Trigger;
import org.apache.flink.streaming.api.windowing.triggers.TriggerResult;
import org.apache.flink.streaming.api.windowing.windows.TimeWindow;

public class MyTrigger extends Trigger<Tuple3<Long, Float, Long>, TimeWindow> {

    @Override
    public TriggerResult onElement(Tuple3<Long, Float, Long> element, long timestamp, TimeWindow window,
            TriggerContext ctx) throws Exception {
        System.out.println("===========>on event: " +element);
        return TriggerResult.CONTINUE;
    }

    @Override
    public TriggerResult onProcessingTime(long time, TimeWindow window, TriggerContext ctx) throws Exception {

        return null;
    }

    @Override
    public TriggerResult onEventTime(long time, TimeWindow window, TriggerContext ctx) throws Exception {

        return null;
    }

    @Override
    public void clear(TimeWindow window, TriggerContext ctx) throws Exception {

        
    }
    
}
